package com.jk.dao;


import com.jk.entity.XsjfEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface XsjfDao {
    @Select("select * from t_jfxs where xsstatus = 1")
    List<XsjfEntity> getXsjf();

    @Update("update  t_jfxs set xsstatus = 2,ustatus = 1,uid =#{uid} where xsid = #{id}")
    void UpdStatus(Integer id,Integer uid);

    @Select("select * from t_jfxs j,t_user u where j.adminid = u.id and uid =#{uid}")
    List<XsjfEntity> getMyxs(Integer uid);

    @Update("update  t_jfxs set ustatus = 3 where xsid = #{id}")
    void uStatus(Integer id);

    @Select("select * from t_user u,t_jfxs j where j.uid= u.id and  j.adminid =#{adminid}")
    List<XsjfEntity> getMyxsAdmin(Integer adminid);

    @Update("update  t_jfxs set ustatus = 2 where xsid = #{id}")
    void AdminStatus(Integer id);

    @Update("update  t_jfxs set ustatus = 1 where xsid = #{id}")
    void AdminStatus1(Integer id);

    @Update("update  t_user set integral =integral+#{xsintegral}  where id = #{uid}")
    void UpduIntegral(Integer uid,Integer xsintegral);
}
